import json

# 创建 test.json 文件
data = [{'a': 1, 'b': 2, 'c': 3}, {'a': 4, 'b': 5, 'c': 6}, {'a': 7, 'b': 8, 'c': 9}]
file = open('test.json', "w", encoding='utf8')
a = json.dump(data, file, ensure_ascii=False)
file.close()
# 打开 test.json文件
with open('test.json', 'r', encoding='utf8') as file:
    dict1 = json.load(file)
    print(dict1)
    list1 = []
    for i in dict1:
        a = tuple(i.values())
        list1.append(a)
    print(list1)

data = {"name": "zhangsan", "age": 20, "city": "shenzhen"}
list1 = []
for i in data.values():
    print(i)
    list1.append(i)
a = tuple(list1)
print(a)

datalist = []
for i in a:
    datalist.append(i)

print(datalist)
